﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace DragDropExample
{
  public partial class MainPage : UserControl
  {
    UserControl currentExampleControl = null;

    public MainPage()
    {
      InitializeComponent();

      SetupExample(new BasicExample());
    }

    void SetupExample(UserControl ExampleControl)
    {
      if (currentExampleControl != null)
      {
        LayoutRoot.Children.Remove(currentExampleControl);
      }

      currentExampleControl = ExampleControl;
      currentExampleControl.SetValue(Grid.ColumnProperty,1);
      LayoutRoot.Children.Add(currentExampleControl);
    }

    private void Basic_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new BasicExample());
    }

    private void Ghost_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new GhostExample());
    }

    private void Group_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new GroupExample());
    }

    private void DraggedOver_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new DraggedOverExample());
    }

    private void Enabled_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new EnabledExample());
    }

    private void DraggedMove_Click(object sender, RoutedEventArgs e)
    {
      SetupExample(new DraggedMoveExample());
    }

  }
}
